package com.cby.jetpack.sample.appstartup.init;

import android.content.Context;
import android.util.Log;
import android.widget.Toast;

/**
 * Description:SDKTwo
 *
 * @author 陈宝阳
 * @create 2020/6/29 16:58
 */
public class SDKTwo {

  private static final String TAG = "SDKTwo";

  private Context context;

  private String packageName;

  private SDKTwo() {}

  public static SDKTwo getInstance() {
    return SingleTon.sINSTANCE;
  }

  private static class SingleTon{
    static final SDKTwo sINSTANCE = new SDKTwo();
  }

  public void init(Context context) {
    this.context = context.getApplicationContext();
    Toast.makeText(context, TAG+"-init", Toast.LENGTH_SHORT).show();
    Log.i(TAG,"SDKTwo----"+context.getPackageName());
    packageName = context.getPackageName();
  }

  public void print() {
    Log.i(TAG,"SDKTwo----"+context.getPackageName());
  }

  public String getPackageName(){
    return packageName;
  }
}
